// 引入工具类
import axios from '../config'

// 使用
const URL = 'api-ca' // 公共前缀地址
export const ruleScene = {
	//场景管理-查询
	queryScenePage(data) {
		return axios.post(URL + '/ca/ruleScene/query', data)
	},
	//运行结果
	queryRunResultPage(data) {
		return axios.post(URL + '/ca/ruleResult/queryResult', data)
	},
	//场景生效
	activityScene(data) {
		return axios.post(URL + '/ca/ruleScene/activityScene', data)
	},
	//场景失效
	inActivityScene(data) {
		return axios.post(URL + '/ca/ruleScene/inActivityScene', data)
	},
	//场景删除
	deleteScene(data) {
		return axios.post(URL + '/ca/ruleScene/removeAndCheck', data)
	},
	//场景保存
	saveScene(data) {
		return axios.post(URL + '/ca/ruleScene/save', data)
	},
	//场景获取
	querySceneByCode(data) {
		return axios.post(URL + '/ca/ruleScene/queryById', data)
	},
	//验证code是否重复
	checkCode(data) {
		return axios.post(URL + '/ca/ruleScene/checkCode', data)
	},
	//获取场景列表
	queryList(data) {
		return axios.post(URL + '/ca/ruleScene/queryList', data)
	},
	//场景运行
	sceneRun(data) {
		return axios.post(URL + '/ca/ruleScene/run', data)
	},
	//场景复制
	saveCopy(data) {
		return axios.post(URL + '/ca/ruleScene/saveCopy', data)
	},
	//检验节点编码是否存在
	checkNodeCode(data) {
		return axios.post(URL + '/ca/ruleSceneNode/checkNodeCode', data)
	},
	//根据场景获取节点数据/根据场景和当前节点获取可作为父节点的数据
	comboBySceneNode(data) {
		return axios.post(URL + '/ca/ruleSceneNode/comboBySceneNode', data)
	},
	//查看
	getRuleNodeDetailImg(data) {
		return axios.post(URL + '/ca/ruleSceneNode/getRuleNodeDetail', data)
	},
	//场景节点分页查询
	getRuleNodeDetail(data) {
		return axios.post(URL + '/ca/ruleSceneNode/query', data)
	},
	//根据节点获取对应规则
	queryForDetail(data) {
		return axios.post(URL + '/ca/ruleSceneNode/queryForDetail', data)
	},
	//获取对比场景下对应节点信息
	queryForList(data) {
		return axios.post(URL + '/ca/ruleSceneNode/queryForList', data)
	},
	//根据场景获取节点和规则
	queryForNodeDetail(data) {
		return axios.post(URL + '/ca/ruleSceneNode/queryForNodeDetail', data)
	},
	//检查删除项是否允许删除并删除
	removeAndCheck(data) {
		return axios.post(URL + '/ca/ruleSceneNode/removeAndCheck', data)
	},
	//保存场景节点
	saveSceneNode(data) {
		return axios.post(URL + '/ca/ruleSceneNode/save', data)
	},
	//保存node和rule关系
	saveRuleNode(data) {
		return axios.post(URL + '/ca/ruleSceneNode/saveRuleNode', data)
	},
	//获取某节点下的规则
	listByNode(data) {
		return axios.post(URL + '/ca/ruleSceneNode/listByNode', data)
	},
	//查询某场景下规则
	listByScene(data) {
		return axios.post(URL + '/ca/ruleSceneNode/listByScene', data)
	},
}




